define(['backbone', '../collections/todos', '../common'],function(Backbone, Todos, Common){
  var Workspace = Backbone.Router.extend({
    routes:{
      '*filter': 'setFilter'
    },

    setFilter: function( param ){
     Common.TodoFilter = param.trim() || '';
     Todos.trigger('filter');
    }
  });

  return Workspace;
});